package com.songlanyun.modules.group.service;


import com.songlanyun.common.drive.IBaseService;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.modules.category.entity.SystemProductCategoryEntity;
import com.songlanyun.modules.group.entity.ProductGoodsGroupEntity;
import com.songlanyun.modules.group.model.vo.GoodsGroupSlim;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 商家店铺商品分组表（只用来在商家店铺内展示）
 *
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2020-11-03 12:57:25
 */
public interface ProductGoodsGroupService extends IBaseService<Long, ProductGoodsGroupEntity> {

    List<Map<String,Object>> getAllGoodsGroup(Long shopId);
    List<ProductGoodsGroupEntity> getChildren(Long shopId,Long parentId);
    List<ProductGoodsGroupEntity> getChildren(Long parentId);
    List<ProductGoodsGroupEntity> getFirstProductGoods(Long shopId);
    ProductGoodsGroupEntity getByShopIdAndId(Long shopId,Long id);

    ProductGoodsGroupEntity add(Long shopId,ProductGoodsGroupEntity entity);
    ProductGoodsGroupEntity update(Long shopId,ProductGoodsGroupEntity entity);
    void deleteByShopIdAndId(Long shopId,Long id);
    List<GoodsGroupSlim> selectGoodsGroupRelation(Long goodsAuthShopId);
    List<GoodsGroupSlim> selectGoodsGroupRelationByGoodsIdAndShopId(Long shopId,Long goodsId);
}

